import rxAjax from '@/assets/js/ajax.js';
import AtsAttencePolicyApi from "@/api/oa/ats/atsAttencePolicy";

//假期制度 api接口
export const AtsHolidayPolicyApi = {};

AtsHolidayPolicyApi.baseUrl= '/api-oa/oa/ats/atsHolidayPolicy';
AtsHolidayPolicyApi.exportUrl= AtsHolidayPolicyApi.baseUrl + '/listExport';

//查询列表
AtsHolidayPolicyApi.query=function (parameter) {
  var url= AtsHolidayPolicyApi.baseUrl + '/query';
  return rxAjax.postJson(url,parameter).then (res => {
    return res.result
  })
}

/**
* 获取单记录
* @param pkId
* @returns {*}
*/
AtsHolidayPolicyApi.get =function(pkId) {
  var url= AtsHolidayPolicyApi.baseUrl + '/get?pkId=' + pkId;
  return rxAjax.get(url);
}

//保存数据
AtsHolidayPolicyApi.save =function(parameter) {
  var url= AtsHolidayPolicyApi.baseUrl + '/save';
  return rxAjax.postJson(url,parameter);
}

//删除数据
AtsHolidayPolicyApi.del =function(parameter) {
  var url= AtsHolidayPolicyApi.baseUrl + '/del';
  return rxAjax.postUrl(url,parameter);
}
//查询全部数据
AtsHolidayPolicyApi.getAll = function () {
  var url = AtsHolidayPolicyApi.baseUrl + '/getAll';
  return rxAjax.get(url);
}

AtsHolidayPolicyApi.getByHolidType = function () {
  var url = AtsHolidayPolicyApi.baseUrl + '/getByHolidType';
  return rxAjax.get(url);
}

export  default AtsHolidayPolicyApi;

